package Test7;

public class Truck extends Car{
    private double payload;

    public Truck(int wheels, double weight, int loader, double payload) {
        super(wheels, weight, loader);
        this.payload = payload;
    }

    public double getPayload() {
        return payload;
    }
    public void setPayload(double payload) {
        this.payload = payload;
    }

    public void show(){
        System.out.println();
        super.show();
        System.out.println(" 载重量:"+this.getPayload());
    }
}
